<extend name="_Layout/layout"/> 
 <block name="main">
<div class="raise right clearfix">
<script src="./Application/Home/View/default/Recharge/css/base64.js"></script>
<script src="./Application/Home/View/default/Recharge/css/Fnc.js"></script>
<style>
.zzzn a{ display:block; float:right; margin:20px; padding:8px 20px; color:#fff; background:#82b52d; font-size: 20px; border-radius:30px; text-decoration:none;}
.zzzn a:hover{ background:#90c13e;}
.ul_recharge_padding{padding:20px 0 0px 160px;}
.recharge_tips{color:#f00; line-height:40px; margin:0;}
.recharge_left_input{margin-left:16px;}
.help_link{ line-height:40px; color:#2471cb; text-decoration:underline; font-size:14px;}
.help_link:hover{ color:#f30;}
.help_link1{ color:#;}
.ebank_pay{font-family: Arial,"微软雅黑"; width:260px; height:40px; color:#fff; font-size:16px; line-height: 40px; text-align: center; margin:0 auto; background:#f60; display: block; text-decoration: none; border: 0;}
.ebank_pay:hover{ background: #f70; color:#fff; text-decoration: none; cursor: pointer;}

.box_close{ height:24px; line-height:24px; width:24px; text-align:center; font-size:14px; color:#999; border-radius:20px; position:absolute; top:10px; right:10px; text-decoration:none; font-family:Arial;}
.box_close:hover{ color:#fff; background:#f00; text-decoration:none;}
.choice_ebank .note1{ width:100px; text-align:right; display:block; float:left; margin-right:5px; line-height:40px;}
.layui-layer-content{text-align:center; margin-top:80px;font-size: 20px;color: #666;text-align: center;}
.layui-layer-content .yes {
    width: 160px; height: 40px;margin-top:80px;
    text-align: center;
    line-height: 40px;
    font-size: 14px;
	background: #4b7100;
    color: #fff;
	border:none;
    text-decoration: none;}
.fkbtn{
    width: 80px;
    height: 30px;
    color: #f60;
	border:1px #f60 solid;
    border-radius: 3px;
    font-size: 12px;
    display: inline-block;
    line-height: 30px;
    text-align: center;
}
.fkbtn:hover{ color:#f60 !important;}

</style>
	<name id="realname" data="暂无"></name>
<div class="ybc_list">
    <div class="ybcoin clearfix">
        <h2 class="left">充值人民币CNY[<span style="color:red">谨防诈骗</span>]</h2>
        <p class="right recharge_tips" style="margin-bottom:0;"><a href="http://www.xnb.cc/Home/Help/index/article_id/59.html" class="help_link">银行卡汇款帮助？</a></p>
    </div>
    <div class="support_ybc pass_ybc ybc_optimize" id="verifyon">
        <div id="tagContent" class="passContent">
            <div class="tagContent selectTag" id="tagContent0">
               <ul class="ybc_optimize_con ul_recharge_padding" id="rollout2" style="margin-top:30px;">                  
                    <li style="margin-top:0; position:relative;" class="choice_ebank">
                        <span class="note1" style="color:#333;font-size:12px;">金额</span>
                        <input name="number" id="over_num" class="money num_three" onkeyup="value=value.replace(/[^\d]/g,&#39;&#39;);notfee();" autocomplete="off" maxlength="10" type="text">
                        <span class="note" style="margin-left: 5px;">最小充值金额100元。</span>
                        <input id="rand_num" value="0" type="hidden">
                    </li>
                    <li class="num_money choice_ebank" style="margin-left:105px; position:relative;">
                        <span class="left">汇款金额：</span>
                        <font id="ure" class="left" color="red"></font>
                        <span class="note" style="position:absolute; top:0; right:-270px; color:#f00; font-size:14px; line-height:20px;">请严格按照汇款金额汇款，汇款金额的后<br>
                        3位是为了保证即时到账系统自动分配的。</span>
                    </li>
                    <li style="margin-top:10px; position:relative;" class="choice_ebank">
                        <span class="note1" style="color:#333;font-size:12px;" id="recharge_name">汇款人姓名</span>
						<input id="recharge_name_yes" class="money num_three" value=""   type="text">
                        <span class="note" style="margin-left: 5px;">系统只接受您实名账户充值</span>
                    </li>
                    <li style="margin-top:10px; position:relative;" class="choice_ebank">
                        <span class="note1 recharge_left_input" style="color:#333;font-size:12px; margin-left:0;" id="recharge_account">支付方式</span>
                        <select class="money num_three" id="paytype" name="paytype" style="width:259px; height:40px;">
                            <option selected="selected" value="请选择银行">请选择支付方式</option>
                             <option  value="1">银行卡转账</option>
                              <option  value="2">微信支付</option>
                               <option  value="3">支付宝支付</option>                           
                        </select>                      
                    </li>
                    <li style="margin-top:10px; position:relative;" class="choice_ebank">
                        <span class="note1 recharge_left_input" style="color:#333;font-size:12px; margin-left:0;" id="recharge_account">汇出银行</span>
                        <select class="money num_three" id="bankOut" name="bankOut" style="width:259px; height:40px;">
                            <option selected="selected" value="请选择银行">请选择银行</option>
                            <volist name="bank_list" id="vo">
                            <option value="{$vo.bankName}">{$vo.bankName}</option>
                            </volist>
                        </select>
                        <span class="note" style="position:absolute; top:0; color:#f00; font-size:13px; line-height:20px;">请注意：部分银行周末汇款，不能及时到账。支付宝转账请备注ID号，否则无法及时到账。</span>
                    </li>
                    <li style="margin-top:10px; position:relative;" class="choice_ebank">
                        <span class="note1 recharge_left_input" style="color:#333;font-size:12px; margin-left:0;" id="recharge_account">汇款账号</span>
                        <input id="recharge_account_yes" class="money num_three" type="text">
                        <span class="note" style="position:absolute; top:0; right:38px; line-height:20px;">(支付账号或微信账号)请准确填写汇款银行账号，否则不能到账，<br>需要人工联系客服排队处理，时间无法保证。</span>
                    </li>           
                    <li style="margin-top:10px; position:relative;" class="choice_ebank">
                        <span class="note1 recharge_left_input" style="color:#333;font-size:12px; margin-left:0;" id="recharge_account">公司银行账号</span>
                        <input id="bank_num" class="money num_three" type="text" readonly="readonly" value="{$banknum}">
                        <span class="note" style="position:absolute; top:0; right:38px; line-height:20px;">请确认银行卡后再转账({$banknum})</span>
                    </li>
                    <li style="margin-top:10px; position:relative;" class="choice_ebank">
                        <span class="note1 recharge_left_input" style="color:#333;font-size:12px; margin-left:0;" id="recharge_account">用户备注</span>
                        <input id="remark_user" class="money num_three" type="text">                        
                    </li>
                    <li style="color:#f00; font-size:16px; margin-top:20px; margin-left:99px;" class="choice_ebank"></li>
                    <li>
                    <a href="javascript:void(0);" onclick="recharge()" class="btn_turn" id="choice_submit" style="margin-left:105px;">生成汇款订单</a></li>
                </ul>
                <div class="turns truns_upper">
                    <h2></h2>
                 </div>              
            </div>           
        </div>
    </div>
</div>
<table class="raise_list" style="border:1px solid #e1e1df;" align="center" border="0" cellpadding="0" cellspacing="0">
    <thead>
        <tr>
            <th>记录ID</th>
            <th>数量</th>
            <th>汇出人姓名</th>
            <th>汇出银行</th>
            <th>汇出账号</th>
            <th>支付方式</th>
            <th>申请时间</th>
            <th>状态</th>
        </tr>
    </thead>
    <tbody>
    <volist name="sq_list" id="vo">
	    <tr>
		    <td>{$vo.id}</td>
		    <td>{$vo.money}</td>
		    <td>{$vo.name_user}</td>
		    <td>{$vo.bank_id|get_bankname}</td>
		    <td>{$vo.banknum_user}</td>
		    <td>{$vo.pay_type|get_pay_text}</td>
		    <td>{$vo.ctime|time_format}</td>
		    <td>{$vo.status|get_status_text}</td>
	    </tr>   
    </volist>
	</tbody>
</table>
</div>
<div class="clear"></div>
</div>
</div>   
<script>
	function closewin(){
		$(".layui-layer-shade").remove();
		$(".layui-layer").remove();
	}
	function notfee(){
		if($("#over_num").val()!=""){
			$("#ure").text((parseInt($("#over_num").val(),10)+0.6).toFixed(3));
		}else{
			$("#ure").text("");
		}
	}
function recharge() {
    var min_num=100;
    var max_num=1000000;
	var fee = 0.6;
	if (this.choice_money == 0) {
        $('.ebank_box_common').show();
        return false;
    }
    // 充值金额
    var over_num = $('#over_num').val();
    var number = over_num ? over_num: 0;
	var rand_num = $('#rand_num').val();
    rand_num = rand_num ? rand_num: 0;
	
    var num = parseInt(number) + parseFloat(rand_num);
    var shiji_num = num+fee;
    if(num < min_num) {
	   layer.open({
			type: 1,
			title: false,
			skin: 'layui-layer-demo', //样式类名
			closeBtn: 0, //不显示关闭按钮
			shift: 2,
			shadeClose: true, //开启遮罩关闭
			content: '<div>充值金额不能小于'+min_num+'元</div><div><button type="button" class="yes" onclick="closewin()">确定</button>',
			area: ['420px', '280px'], //宽高
		});
        return false;
    }
    var umane=$('#recharge_name_yes').val();
    var paytype=$('#paytype').val();
    var bankname=$('#bankOut').val();
    var banknum=$('#recharge_account_yes').val();//会员银行卡号
    var bank_num=$('#bank_num').val();//公司银行卡
    var remark_user=$('#remark_user').val();
	var url="{:U('Home/Recharge/add_ajax')}";
	if(umane == ""){
		alert('汇款人姓名不能为空！');
		 return false;
	}
	if(paytype == ""){
		alert('请选择付款方式！');
		 return false;
	}
	
	if(bankname == ""){
		alert('请选择汇出银行！');
		 return false;
	}
	
	if(banknum == ""){
		alert('请填写银行卡号！');
		 return false;
	}		
	$.getJSON(url,{shiji_num:shiji_num,umane:umane,paytype:paytype,bankname:bankname,banknum:banknum,bank_num:bank_num,remark_user:remark_user},function(json){
		if(json.status>0)
			{
				layer.msg(json.msg);
				 setTimeout(function(){
					location.reload();
					},2000);
			}else{
				layer.msg(json.msg);
			}
    });	
};
</script>
<script>
    $(".menu12").addClass("uc-current");
    function showTips(id,msg){
        var tips = layer.tips(msg, id, {
            tips: [1, '#fff8db'],
            area: ['400px', '35px']
        });
        $(id).on('mouseout', function(){
            layer.close(tips);
        });
    }
</script>
<style>
.rightwidth{ width:340px;}
</style>
</block>